package mushystuff.dtb.ws.endpoint;

import mushystuff.dtb.core.service.ProductService;
import mushystuff.dtb.core.service.to.ProductInfoTO;
import mushystuff.dtb.core.service.to.ProductTO;

public class ProductServiceEndpoint {

    private ProductService productService;

	public ProductServiceEndpoint(ProductService productService) {
		this.productService = productService;
    }

    public void createProduct(String name) {
	ProductTO productTO = new ProductTO();
	productTO.setName(name);
	productService.createUpdateProduct(productTO);
    }

    public void modifyProduct(ProductTO productTO) {
	productService.createUpdateProduct(productTO);
    }

    public ProductInfoTO[] getAllProductsInfo() {
	return productService.getAllProductsInfo();
    }

    public ProductTO[] getAllActiveProducts() {
	return productService.getAllActiveProducts();
    }

}
